import java.util.Scanner;

public class Main1 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);

        String ProductName = new String();
        int num = 0;
        num =new Integer();

        String yourAccount = "";
        String yourPassword = "";

        while (true) {
            System.out.print("请输入用户名: ");
            yourAccount = scanner.nextLine();
            System.out.println("请输入密码: ");
            yourPassword = scanner.nextLine();
            if (yourPassword.isEmpty() || yourAccount.isEmpty()) {
                System.out.println("用户名或密码不能为空!");
                continue;
            }
            if (yourPassword.length() > 6 || yourAccount.length() > 8) {
                System.out.println("用户名长度不打于6，密码长度不大于8 !");
                continue;
            }
            if (!(yourAccount.equals(account) && yourPassword.equals(password))) {
                System.out.println("用户名或密码不正确!");
                continue;
            }
            System.out.println("登录成功!");
            System.out.println("账号：" + yourAccount);
            System.out.println("密码：" + yourPassword.substring(0, yourPassword.length() - 3) + "***");
            break;
        }
    }
}